#include <stdio.h>
int main()
{
    int arr[3][4];
    int i,j,k;
    i = j = k = 0;
    while(i < 3)
    {
        while(j < 4)
        {
            arr[i][j] = k;
            printf("arr[%d][%d] = %d\n",i,j,arr[i][j]);  
            k++;
            j++;
        }
        i++;
        if(j == 4)
        {
            j = 0;
        }
    }
    return 0;
}
